package book;

public class BookList {
    private Book[] books;
    private int bookNum;

    public BookList() {
        this.books = new Book[4];
        this.books[0] = new Book("x西游记", "w吴承恩", 29.9, "小说");
        this.books[1] = new Book("s三国演义", "l罗贯中", 49.9, "小说");
        this.books[2] = new Book("s水浒传", "s施耐庵", 39.9, "小说");
        this.books[3] = new Book("h红楼梦", "c曹雪芹", 89.9, "小说");
        this.bookNum = 4;
    }

    public Book[] getBooks() {
        return books;
    }

    public Book getBook(int pos) {
        return books[pos];
    }

    public void setBook(Book book, int pos) {
        this.books[pos] = book;
    }

    public int getBookNum() {
        return bookNum;
    }

    public void setBookNum(int bookNum) {
        this.bookNum = bookNum;
    }
}
